package com.LachesismStorm.lachesism.core.exception;

import com.LachesismStorm.lachesism.core.common.system.IErrorCode;

import java.util.List;

/**
 * 断言处理类，用于抛出各种API异常
 *
 * @author: juiet
 * @date: 2022年06月15日 17:11
 */
public class Asserts {
    public static void fail(String message) {
        throw new ApiException(message);
    }

    public static void fail(IErrorCode errorCode) {
        throw new ApiException(errorCode);
    }
    public static void fail(List list) {
        throw new ApiException((Throwable) list);
    }

}
